﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;
using System.ServiceModel;

namespace WcfClientGenerator.Model.Config
{
    /// <summary>
    /// The configuration container for calling the generator service
    /// </summary>
    [XmlRoot("generatorServiceConfiguration")]
    public class GeneratorServiceConfiguration
    {
        #region Constructors

        public GeneratorServiceConfiguration()
        {
            this.SecurityMode = BasicHttpSecurityMode.None;
            this.MaxReceivedMessageSize = 67108864;
            this.MaxBufferPoolSize = 524288;
            this.MaxBufferSize = 65536;
        }

        #endregion
        
        #region Properties

        [XmlElement("securityMode")]
        public BasicHttpSecurityMode SecurityMode { get; set; }

        [XmlElement("maxReceivedMessageSize")]
        public long MaxReceivedMessageSize { get; set; }

        [XmlElement("maxBufferSize")]
        public int MaxBufferSize { get; set; }

        [XmlElement("maxBufferPoolSize")]
        public long MaxBufferPoolSize { get; set; }

        #endregion
    }
}
